#pragma once

class Vector2
{
public:
    float x, y;

    Vector2( float oX = 0.0f, float pY = 0.0f );
    ~Vector2();

    void operator+= ( Vector2 &pVect );
    void operator-= ( Vector2 &pVect );
    void operator*= ( float scalar );
    void operator+= ( float scalar );
    void operator/= ( float scalar );
    Vector2 operator* ( const float oScalar ) const;
    Vector2 operator+ ( const Vector2 &pVect ) const;
    Vector2 operator- ( const Vector2 &pVect ) const;

    void AddX( float pScalar );
    void AddY( float pScalar );

    void Rotate( const float pAngle );
    void Normalize( void );
    void Flip( void );

    float Dot( const Vector2 &pVect ) const;
    float Dist( const Vector2 &pVect ) const;
    float Cross( const Vector2 &pVect2 ) const;
    float Magnitude( void );
    float MagnitudeSquared( void );

    Vector2 GetPerpendicular( void );
    Vector2 GetConnection( Vector2 pV );
    Vector2 GetComponentOnto( Vector2 &pVect );
};
